using Utils;

namespace Game.Networking.Server {
	public class DebugUnitEventsWatcher : UnitEventsWatcher {
		public EventBus<uint> AttachedEntityChangedBus = new EventBus<uint>();
		public EventBus<string> CodeFileUpdatedBus = new EventBus<string>();
		public EventBus FileListChangedBus = new EventBus();
		public EventBus UnitStateChangedBus = new EventBus();
		public EventBus TerminalCommandBus = new EventBus();

		public override void OnAttachedEntityIdChanged(uint newEntity) {
			AttachedEntityChangedBus?.Fire(newEntity);
		}

		protected override void OnCodeFileUpdated(string fileName) {
			CodeFileUpdatedBus?.Fire(fileName);
		}

		protected override void OnFileListChanged() {
			FileListChangedBus?.Fire();
		}

		protected override void OnTerminalCommand(TerminalCommandEvent cmd) {
			TerminalCommandBus?.Fire();
		}

		protected override void OnUnitStateChanged() {
			UnitStateChangedBus?.Fire();
		}
	}
}
